import { http } from '@/utils/http'

export function usePurchaseApplyApi() {
  return {
    // 获得采购申请
    getPurchaseApply(id: string) {
      return http.get<PurchaseApplyForm>('/prod-api/admin-api/project/purchase-apply/getDetail?id=' + id)
    },
    // 获得合同内、签证物品列表
    getPAItemList(projectNumber: string) {
      return http.get('/prod-api/admin-api/project/purchase-apply/itemSelectList?projectNumber=' + projectNumber)
    },
    // 根据流程Id获得采购申请
    getPAByProcessInstanceId(processInstanceId: string) {
      return http.get<PurchaseApplyForm>('/prod-api/admin-api/project/purchase-apply/getDetailByProcessInstanceId?processInstanceId=' + processInstanceId)
    }
  }
}
